<HTML><HEAD><TITLE>current_array(?Array, -Options)</TITLE>
</HEAD><BODY>[ <A HREF="index.html">Non-logical Variables, Arrays, Bags, Shelves and Stores</A> | <A HREF="../../index.html">Reference Manual</A> | <A HREF="../../fullindex.html">Alphabetic Index</A> ]
<H1>current_array(?Array, -Options)</H1>
Succeeds if there exists an array as denoted by Array and with type and
visibility as given in the list Options.


<DL>
<DT><EM>Array</EM></DT>
<DD>Atom or compound term.
</DD>
<DT><EM>Options</EM></DT>
<DD>Variable or list.
</DD>
</DL>
<H2>Description</H2>
   current_array/2 is used to retrieve information about existing
   visible arrays, non-logical variables and references.  Array is a
   term denoting the array's name and dimensions and Options is a list
   describing the array's type (prolog, float, integer or byte) and visibility.

<H3>Modes and Determinism</H3><UL>
<LI>current_array(-, -) is nondet
<LI>current_array(+, -) is semidet
</UL>
<H3>Modules</H3>
This predicate is sensitive to its module context (tool predicate, see @/2).
<H3>Fail Conditions</H3>
Fails if there is no array whose name unifies with ArrayName
<H3>Exceptions</H3>
<DL>
<DT><EM>(5) type error </EM>
<DD>Array is neither variable, atom nor compound term.
<DT><EM>(5) type error </EM>
<DD>Options is neither a list nor a variable.
</DL>
<H2>Examples</H2>
<PRE>
[eclipse 1]: local array(a(2)), array(b(2,3,4), float).

yes.
[eclipse 2]: current_array(a(Size), [Type,Vis|_]).

Size = 2
Type = prolog
Vis = local
yes.
[eclipse 3]: current_array(Array, Props).

Array = a(2)
Props = [prolog, local]     More? (;)

Array = b(2, 3, 4)
Props = [float, local]     More? (;)

no (more) solution.

Error:
      current_array("a", L).    (Error 5).
      current_array(a, 9).      (Error 5).


</PRE>
<H2>See Also</H2>
<A HREF="../../kernel/storage/array-1.html">array / 1</A>, <A HREF="../../kernel/storage/array-2.html">array / 2</A>, <A HREF="../../kernel/storage/variable-1.html">variable / 1</A>
</BODY></HTML>
